import Cookies from 'js-cookie'

const TokenKey = 'hr_my_token'
// 和localstorage用法类似
export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
// 主动介入token失效
const timekey = 'hr_my_token'
export function getTimeStamp() {
  // 获取时间戳
  return Cookies.get(timekey)
}
